﻿using System;
using System.Collections.Generic;
using System.Text;

namespace MyCadDll.MyObject
{
    public class MyCompareClass_X<T>:IComparer<T>
    {
        public int Compare(T x, T y)
        {
            if (x is MyText)
            {
                return (x as MyText).CompareTo_X(y);
            }
            if (x is MyLine)
            {
                return (x as MyLine).CompareTo_X(y);
            }
            throw new NotImplementedException();
        }
    }
    public class MyCompareClass_Y<T> : IComparer<T>
    {

        public int Compare(T x, T y)
        {
            if (x is MyText)
            {
                return (x as MyText).CompareTo_Y(y);
            }
            if (x is MyLine)
            {
                return (x as MyLine).CompareTo_Y(y);
            }
            throw new NotImplementedException();
        }
    }
    public class MyCompareClassFromLine_X<T> : IComparer<T>
    {

        public int Compare(T x, T y)
        {
            if (x is MyText)
            {
                return (x as MyText).CompareTo_Line_X(y);
            }
            throw new NotImplementedException();
        }
    }

    public class MyCompareClassFromLine_Y<T> : IComparer<T>
    {

        public int Compare(T x, T y)
        {
            if (x is MyText)
            {
                return (x as MyText).CompareTo_Line_Y(y);
            }
            throw new NotImplementedException();
        }
    }
}
